﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;


namespace EZCRS.HCMS.Entity
{
    #region H_City
    /// <summary>
    /// This object represents the properties and methods of a H_City.
    /// </summary>
    [DataFieldAttribute("HCRS_City")]
    public class HCRS_City
    {
        private int? _id;
        private int? _provinceID;
        private string _name = String.Empty;
        private string _remark = String.Empty;
        private string _latitude = String.Empty;
        private string _longitude = String.Empty;
        private string _photoUrl = String.Empty;

        public HCRS_City()
        {
        }

        public HCRS_City(DataRow dr)
        {
            if (dr != null)
            {
                _id = Convert.ToInt32(dr["CityID"].ToString());
                if (dr["ProvinceID"].ToString() != "")
                    _provinceID = Convert.ToInt32(dr["ProvinceID"].ToString());
                _name = dr["name"].ToString();
                _remark = dr["remark"].ToString();
                _latitude = dr["latitude"].ToString();
                _longitude = dr["longitude"].ToString();
                _photoUrl = dr["PhotoUrl"].ToString();
            }
        }

        #region Public Properties
        [DataFieldAttribute("CityID","pk")]
        public int? Id
        {
            get { return _id; }
            set { _id = value; }
        }

        public int? ProvinceID
        {
            get { return _provinceID; }
            set { _provinceID = value; }
        }

        public string Name
        {
            get { return _name; }
            set { _name = value; }
        }

        public string Remark
        {
            get { return _remark; }
            set { _remark = value; }
        }

        public string Latitude
        {
            get { return _latitude; }
            set { _latitude = value; }
        }

        public string Longitude
        {
            get { return _longitude; }
            set { _longitude = value; }
        }

        public string PhotoUrl
        {
            get { return _photoUrl; }
            set { _photoUrl = value; }
        }
        #endregion
    }
    #endregion
}
